widget: Change slightly the gesture cancellation policy in a same widget
authorCarlos Garnacho <carlosg@gnome.org>
Tue, 6 May 2014 12:12:13 +0000 (14:12 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Fri, 23 May 2014 17:54:29 +0000 (19:54 +0200)
commit134acf3fda0857681e3874fd8185e5236ce70000
tree3a3a1fa45b4876e6402ec76b8b830024e5c8e3ce
parent4589f0e0c841c58b4418cecded0ad3a2a4f6e9d2
widget: Change slightly the gesture cancellation policy in a same widget

Within a widget, if a gesture accepts a sequence, it would previously
cancel every other gesture that not in the same group. Change this to
only cancelling gestures that previously claimed the gesture, and let
gestures with state=NONE for that sequence remain like that.

This enables late recognition of gestures, even on the presence of
another gesture group that was more eager at claiming the gesture.

One usecase is user-defined panning gestures on scrolledwindows,
if ::capture-button-press is TRUE (eg. the default), the gesture is
claimed early in order to consume the button press, but that would
tipically make every other gesture group deny the sequence. With
this change, the pan gesture can keep state=NONE, and later claim
the sequence for itself if the panning gesture is recognized.

Also, do not propagate state=DENIED to every gesture in the widget,
that was unintended.
gtk/gtkwidget.c